package com.azusa.xbiao.service;

import com.azusa.xbiao.entity.Address;

import java.util.List;
import java.util.Map;

public interface AddressService {

    List<Address> findUserAll(Integer id);

    /**
     * 根据id删除收货地址
     * @param id
     */
    void deleteAddressById(int id);

    /**
     * 修改默认地址
     * @param aid
     * @param uid
     */
    void updateDefaults(int aid,int uid);

    /**
     * 添加地址
     * @param uid
     * @param params
     */
    void insertAddress(int uid, Map<String, String> params);

    /**
     * 查询具体用户的具体收货地址
     * @param aid
     * @param uid
     * @return
     */
    Address findAddressById(int aid, int uid);

    /**
     * 修改收货地址
     * @param address
     * @return
     */
    int updateAddress(Address address);
}
